#pragma once 
#include<iostream>
using namespace std;
class date 
{
    public:
        friend ostream& operator<<(ostream& out,const date& d);
        friend istream& operator>>(istream& in,date& d);
        date(int day=1,int month=1,int year=1990)
            :_day(day)
            ,_month(month)
            ,_year(year)
        {}
        date& operator=(const date& d)
        {
            _day=d._day;
            _month=d._month;
            _year=d._year;
            return *this;
        }
        bool operator==(const date& d)const 
        {
            return ((_day==d._day)&&
                    (_month==d._month)&&
                    (_year==d._year));
        }
        bool operator!=(const date& d)const 
        {
            return !(*this==d);
        }
        bool operator<(const date& d)const 
        {
            return ((_day<d._day)&&
                    (_month<d._month)&&
                    (_year<d._year));
        }
        bool operator>(const date& d)const 
        {
            return (!(*this<d))&&(*this!=d);
        }
        bool operator<=(const date& d)const 
        {
            return !(*this>d);
        }
        bool operator>=(const date& d)const 
        {
            return !(*this<d);
        }
        date& operator++()
        {
            _day++;
            return *this;
        }
        date operator++(int)
        {
            date tem=*this;
            ++(*this);
            return tem;
        }

    private:
        int _day;
        int _month; 
        int _year;
};
ostream& operator<<(ostream& out,const date& d)
{
    out<<d._year<<"->"<<d._month<<"->"<<d._day;
    return out;
}
istream& operator>>(istream& in,date& d)
{
    in>>d._year>>d._month>>d._day;
    return in;
}
